<!--{include manage_header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="coupons">
	<div class="dashboard" id="dashboard">
		<ul>${mcurrent_coupon('card')}</ul>
	</div>
	<div id="content" class="clear mainwide">
        <div class="clear box">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
					<h2>代金券</h2>
				</div>
				<div class="sect" style="padding:0 10px;">
					<form method="get">
							商品ID：<input type="text" name="tid" value="${htmlspecialchars($tid)}" class="h-input" />
							&nbsp;
							代号：<input type="text" name="code" value="${htmlspecialchars($code)}" class="h-input" />&nbsp;
							状态：<select name="state">${Utility::Option($usage, $state, '所有')}</select>&nbsp;
							<input type="submit" value="搜索" class="formbutton"  style="padding:1px 6px;"/>&nbsp;
							<input type="submit" name="download" value="下载" class="formbutton"  style="padding:1px 6px;"/>
						<form>
				</div>
                <div class="sect">
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
					<tr>
						<th width="260">ID</th>
						<th width="40">面额</th>
						<th width="220">代号</th>
						<th width="240">有效期限</th>
						<th width="100">状态</th>
						<th width="100">是否发放</th>
						<th width="120">操作</th>
					</tr>
					<!--{loop $cards $index $one}-->
					<tr ${$index%2?'':'class="alt"'} id="team-list-id-{$one['id']}">
						<td>{$one['id']}</td>
						<td nowrap>${moneyit($one['credit'])}</td>
						<td nowrap>{$one['code']}</td>
						<td nowrap>${date('Y-m-d',$one['begin_time'])}&nbsp;&nbsp;${date('Y-m-d',$one['end_time'])}</td>
						<td nowrap>${$one['consume']=='Y' ? '已用':'未用'}<!--{if $one['consume']=='Y'}-->&nbsp;({$one['team_id']})<!--{/if}--></td>
						<td nowrap>${$one['uid']=='0' ? '未发放':'<font style="color:red;">已发放</font>'}</td>
						<td class="op" nowrap><a href="/ajax/manage.php?action=cardremove&id={$one['id']}" class="ajaxlink" ask="确定删除本张代金券？">删除</a>&nbsp;|&nbsp;<a href="/ajax/manage.php?action=cardremovezone&id={$one['id']}" class="ajaxlink" ask="确定删除本批次代金券？">删除本批</a></td>
					</tr>
					<!--{/loop}-->
					<tr><td colspan="7">{$pagestring}</td></tr>
                    </table>
                </div>
            </div>
            <div class="box-bottom"></div>
        </div>
	</div>

<div id="sidebar">
</div>

</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include manage_footer}-->
